FROM golang:1.20.5-alpine3.18 AS builder

ENV GOPROXY=https://goproxy.io,direct

COPY . /go/src/go-bootcamp
WORKDIR /go/src/go-bootcamp

RUN go install gitee.com/joil-z/go-bootcamp/webook/...

FROM alpine:3.18
COPY --from=builder /go/bin/webook /bin/webook

EXPOSE 8080

ENTRYPOINT ["/bin/webook"]